package cn.bs.allensocket;

import java.util.Vector;

/**
 * Created by Allen on 2014/11/3.
 */
public class InstanceTest {
    interface A{}
    class B implements A{}
    class C extends B {}

    public static void main(String[] arge){
        A a = null;
        B b = null;
        boolean c ;
        c = a instanceof A;
        System.out.println("case----instanceof-------1");
        System.out.println("a instanceof A Printout:" + c);
        c = b instanceof B;
        System.out.println("b instanceof B Printout:" + c);
        System.out.println("case----instanceof-------2");
        //静态方法不允许用new
//        b = new B();
//        c = b instanceof  B;
//        System.out.println("b instanceof B Printout:" + c);
        //Vector
         Vector vector ;
        vector = new Vector();
        Object obj = vector.add("asfefefe");
        System.out.println("输入add返回值" + vector.add("asfefef"));
    }
}
